<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %> 
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>  	
    <title>店铺列表</title>
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<s:head/>   
	<link rel="stylesheet" href="../theme1/css/reset.css" type="text/css"/>
	<link rel="stylesheet" href="../theme1/css/screen.css" type="text/css"/>
	<link rel="stylesheet" href="../theme1/css/screen-common.css" type="text/css"/>	
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript" src="../theme1/js1/script.js"></script>
  </head>
  
  <body>
  <div class="page wrap" >
  <!-- menu bar -->
  <div class="menubar clear" >
	  <ul class="menus clear">
		  <li><a href="Shop_edit.action">添加店铺</a></li>
	  </ul>
  </div>
  <div class="content-box">
   <div class="box-header clear">					
			<h2>店铺列表</h2>
    </div>
    <div class="box-body clear">
    <s:actionerror/>
    <s:actionmessage/>
    <table>
    <thead>
	  <tr>
	  	<th><input type="checkbox" class="checkbox select-all"></th>
    	<th>登录标识</th>
    	<th>登录密码</th>
    	<th>网店名称</th>
    	<th>所属公司</th>
    	<th>负责人</th>
    	<th>公司地址</th>
    	<th>操作</th>
	  </tr>
	 </thead>
	 <tbody>
	 <s:iterator value="shopList" id="shop">
    		<tr>
    			<td><input type="checkbox" class="checkbox" value="<s:property value="#a.getId()"/>"></td>
    			<td><s:property value="#shop.adminName"/></td>
    			<td><s:property value="#shop.password"/></td>
    			<td><s:property value="#shop.shopName"/></td>
    			<td><s:property value="#shop.shopCompany"/></td>    			
    			<td><s:property value="#shop.principal"/></td>
    			<td><s:property value="#shop.address"/></td>
    			<s:url var="delete" value="Shop_delete.action">
					<s:param name="shopId" value="#shop.id"></s:param>
				</s:url>
				<s:url var="edit" value="Shop_edit.action">
					<s:param name="shopId" value="#shop.id"></s:param>
				</s:url>
				<s:url var="view" value="Shop_view.action">
					<s:param name="shopId" value="#shop.id"></s:param>
				</s:url>
				<td>
				<s:a href="%{delete}"><img title="删除" alt="" class="icon16 fl-space2" src="../theme1/images/ico_delete_16.png"/></s:a> &nbsp;&nbsp;
				<s:a href="%{edit}"><img title="编辑" alt="" class="icon16 fl-space2" src="../theme1/images/ico_edit_16.png"/></s:a> &nbsp;&nbsp;
				<s:a href="%{view}">详细信息</s:a>
    			</td>
    		</tr>
    	</s:iterator>	  	  
	  </tbody>
  </table>
  
  <pg:pager url="Product_list.action" items="" 
    		export="currentPageNumber=pageNumber" maxPageItems="3" maxIndexPages="5">      
     <pg:first>  
         <a href="${pageUrl}">首页</a>  
     </pg:first>  
     <pg:prev>  
         <a href="${pageUrl }">上一页</a>  
     </pg:prev>  
     <pg:pages>      
         <c:choose>  
             <c:when test="${currentPageNumber eq pageNumber}">  
                 <font color="red">${pageNumber }</font>  
             </c:when>  
             <c:otherwise>  
                 <a href="${pageUrl }">${pageNumber }</a>  
             </c:otherwise>  
         </c:choose>         
     </pg:pages>  
     <pg:next>  
         <a href="${pageUrl }">下一页</a>  
     </pg:next>  
     <pg:last>  
         <a href="${pageUrl }">尾页</a>  
     </pg:last>  
 </pg:pager>
    </div>
  </div>
  </div>  
  </body>
</html>
